mrdoob
Repos
40
Followers
19969
Following
172

Events

Updated package-lock.json

Created at 3 hours ago

Updated builds.

Created at 3 hours ago
issue comment
VectorKeyframeTrack goes an infinite loop when I give a wrong length of `values`

how about changing the loop ending condition from !== to <? This does not require any addition of validations.

https://github.com/mrdoob/three.js/blob/309b00afb6dcbc5e6c58e72f10eaa8d2e8888c83/src/math/interpolants/LinearInterpolant.js#L23

That change sounds goo to me 👍

Created at 3 hours ago
closed issue
Feature: Add the OpenSSF Scorecard GitHub Action

Is your feature request related to a problem? Please describe.

Open-source supply-chain attacks are increasing every year. Due to three.js' position as the most popular JS 3D library, it's been included in the Open Source Security Foundation (OpenSSF)'s list of the 100 most important open-source projects.

Describe the solution you'd like

Add the OpenSSF Scorecard GitHub Action, which performs dozens of automated checks to ensure the project's security posture is continuously solid. The Scorecard is a form of project "meta analysis"; it doesn't detect vulnerabilities in your code, but instead makes sure your settings and security features are following the best practices to minimize the risk of vulnerabilities.

For instance, #24332 was based on feedback from the Scorecards system.

(Spoiler alert: three.js has a very solid 7.5/10 score, which puts it at the top 5% of relevant projects)

Would you be interested in a PR to add this Action?

The Action has an associated badge that can be (optionally) added as well.

Additional context

I work for Google (an OpenSSF founding member), working full-time to help open-source maintainers improve their projects' security.

Detail of a Token-Permissions alert, indicating the specific file and remediation steps

Created at 3 hours ago
issue comment
Docs: and tests for textures/FramebufferTexture

Now it says Files changes: 0 🤔

Created at 3 hours ago

Puppeteer E2E test: Clean up (#25314)

  • Cleanup

  • Revert port change

  • More cleanup in check-coverage.js

  • Even more cleanup

  • Update puppeteer.js

Created at 3 hours ago
pull request closed
Puppeteer E2E test: Clean up

Related issue: https://github.com/mrdoob/three.js/pull/24109#issuecomment-1398621694

Description

The first part from https://github.com/mrdoob/three.js/pull/24109 -- just a cleanup. (Also adds idleTime and parseTime variables.)

Created at 3 hours ago

Build: Update package locks (#25356)

  • Update package-lock.json

Package lock for 149 was not updated to 149.

  • Update package-lock.json

Test package lock for 149 was not updated to 149. This is the "test" package in this mono-repo.

Created at 3 hours ago
pull request closed
Build: Update package locks

Related issue: none.

Description

Package lock files for 149 were not updated to 149. Will look at build script to remove this chore. I'm looking at tree-shaking and this is coming up every time I reset my environment.

Created at 3 hours ago
issue comment
Add displacement options in Reflector

Is this PR related to this tweet? https://twitter.com/_Thibka/status/1617289419748261896

I think having a normalMap or bumpMap in Reflector would be nice and would fit with the rest of the code. We use displacementMap for displacing vertices and we've never used distortion as far as I remember.

Created at 3 hours ago
issue comment
Docs: and tests for textures/FramebufferTexture

Seems like the PR has conflicts.

Created at 3 hours ago

Tests: Unit Tests for Textures (#25365)

  • Tests: stub textures/FramebufferTexture unit tests

Add unit test file for textures/FramebufferTexture

  • Docs: update textures/FramebufferTexture.html

Add missing properties and describe how they differ from the base class, Texture.

  • Docs: update textures/FramebufferTexture.html

Add example code, link to full example, add property that differs from base class.

  • Update DepthTexture.tests.js

DepthTexture extends from Texture

  • Update FramebufferTexture.tests.js

FramebufferTexture extends from Texture

  • Update CanvasTexture.tests.js

CanvasTexture extends from Texture

  • Update DepthTexture.tests.js

Add missing property test stubs.

  • Update CompressedTexture.tests.js

CompressedTexture extends from Texture

  • Update CompressedTexture.tests.js

Add missing property test stubs.

  • Create CompressedArrayTexture.tests.js

Add missing unit test file, one complete test to show its working, stubs for members.

  • Update CubeTexture.tests.js

CubeTexture extends from Texture

  • Create Data3DTexture.tests.js

Add missing unit test file, one complete test to show its working, stubs for members.

  • Create DataArrayTexture.tests.js

Add missing unit test file, one complete test to show its working, stubs for members.

  • Update three.source.unit.js

Link to added unit tests.

  • Update DataTexture.tests.js

DataTexture extends from Texture

  • Update Texture.tests.js

Texture extends from EventDispatcher. Add missing property and method test stubs.

  • Update VideoTexture.tests.js

VideoTexture extends from Texture. Add missing properties and method test stubs.

  • Update Texture.tests.js

Separate INHERITANCE and INSTANCING tests.

Created at 3 hours ago
pull request closed
Tests: Unit Tests for Textures

Related issue: none

Description

Following the second pull request to nail down the process, this cleans up the unit tests for Textures. It fills in one working unit test for each (up from 0) and populates the missing member tests with stubs.

Created at 3 hours ago

Tests: Unit Tests for Scenes (#25366)

  • Update Scene.tests.js

Scene extends from Object3D. Add test stubs for missing properties.

  • Update Fog.tests.js

cleanup, add missing member stubs

  • Update FogExp2.tests.js

cleanup, add missing member stubs

Created at 3 hours ago
pull request closed
Tests: Unit Tests for Scenes

Related issue: none.

Description

This cleans up the unit tests for Scenes. It fills in a unit test and populates the missing member tests with stubs.

Created at 3 hours ago

Update REVISION (#25355)

Created at 1 day ago
pull request closed
Update REVISION

Please merge when appropriate

Created at 1 day ago
issue comment
Replaced TwoPassDoubleSide with material.forceSinglePass

Can you please explain your reason?

This felt good:

const geometry = new THREE.SphereGeometry();
const material = new THREE.MeshStandardMaterial( { opacity: 0.5, transparent: true, forceSinglePass: true } );

const  mesh1 = new THREE.Mesh( geometry, material );
mesh1.position.set( 2, 0, 0 );
scene.add( mesh1 );

const  mesh2 = new THREE.Mesh( geometry, material );
mesh2.position.set( - 2, 0, 0 );
scene.add( mesh2 );

Compared to this:

const geometry = new THREE.SphereGeometry();
const material = new THREE.MeshStandardMaterial( { opacity: 0.5, transparent: true } );

const  mesh1 = new THREE.Mesh( geometry, material );
mesh1.position.set( 2, 0, 0 );
mesh1.renderForceSinglePass = true;
scene.add( mesh1 );

const  mesh2 = new THREE.Mesh( geometry, material );
mesh2.position.set( - 2, 0, 0 );
mesh2.renderForceSinglePass = true;
scene.add( mesh2 );
Created at 3 days ago

Fix Audio stop() (#25336)

  • Fix Audio stop()

Fix stop()

When source is null, the method will throw an Exception

  • Update Audio.js

Co-authored-by: mrdoob info@mrdoob.com

Created at 3 days ago
closed issue
Fix Audio stop()

Description

When stopping a sound without source an exception is thrown: Uncaught TypeError: Cannot read properties of null (reading 'stop')

Reproduction steps

  1. Create an audio without any source
  2. call audio.stop()

Code

// code goes here

Live example

n/a

Screenshots

No response

Version

148

Device

No response

Browser

No response

OS

No response

Created at 3 days ago
pull request closed
Fix Audio stop()

Related issue:

  • Fix #25337

Description

Fix a bug appears when calling stop() without a source. If the source is null, an Exception is thrown. Uncaught TypeError: Cannot read properties of null (reading 'stop')

Created at 3 days ago
issue comment
Fix Audio stop()

Probably better to check that is not null.

Created at 3 days ago

Update Audio.js

Created at 3 days ago

r149

Created at 3 days ago

DRACOLoader: Revoke workerSourceURL. (#25174)

Remove JS syntax > ECMA 2018 (#25172)

  • Remove JS snytax > ECMA2018

  • NodeBuilder: Fix hasGeometryAttribute().

  • Update NodeBuilder.js

  • Remove static fields.

Use TwoPassDoubleSide (#25175)

AVIF is supported, too. (#25176)

Maintain consistent nomenclature (#25178)

Examples: Clean up. (#25181)

ArcballControls: Fix code style. (#25182)

Add RGTC support (#25180)

Update constants.js

Euler: Updated static class properties to ALL_CAPS (#25104)

  • Updated static class properties to ALL_CAPS

  • new nomemclature

  • Clean up

  • Updated static class properties to ALL_CAPS

Updated builds.

Examples: More clean up. (#25183)

Examples: More clean up. (#25184)

NodeMaterial & WebGPU: Revision of Lighting Model System (#25170)

  • CubeTextureNode: cleanup

  • Added ExtendedMaterialNode

  • MaterialNode: Add UV, SHININESS, SPECULAR_COLOR, REFLECTIVITY

  • CondNode: Support to use of "if" only and "void"

  • Add LightingModel class

  • ExpressionNode: Fix if used with "void" type

  • ReflectVectorNode: udpate syntax

  • Object3DNode: Added DIRECTION

  • ShaderNode: Add materialUV, materialShininess, materialSpecularColor, materialReflectivity

  • StackNode: new add() method

  • NodeBuilder: Non-breakline supports

  • Add DiscardNode

  • Rename exp2Fog to densityFog

  • Revised lighting system and added Phong Model Lighting

  • Added webgpu phong example

  • update example

  • cleanup

  • cleanup(2)

  • cleanup

  • cleanup

  • Remove JS syntax > ECMA 2018

  • cleanup by @LeviPesin

  • Downgrade Logical OR assignments

Clean up (#25189)

Build: Remove Babel. (#25192)

  • Build: Remove Babel.

  • Update package-lock.json

Simplified webgl_lines_fat_raycasting.html (#25191)

  • Simplified example

  • Clean up

Update package.json

Clean up.

Examples: Remove remaining linter issues. (#25195)

Update rendering-on-demand.html (#25199)

不在→不再

Created at 3 days ago
create tag
mrdoob create tag r149
Created at 3 days ago

r149

Created at 3 days ago

Editor: Set ColorManagement.legacyMode = false (#25222)

  • Editor: Set ColorManagement.legacyMode = false

  • Editor: Enable ColorManagement for apps.

Created at 3 days ago
pull request closed
Editor: Set ColorManagement.legacyMode = false

The <input type="color"> HTML element provides an sRGB color picker1, and the preview swatches shown in the picker reflect that, but the Editor does not. I think it would be best to account for the color space when working in the Editor. This allows, for example, setting #1A7FEB anywhere in the Editor and seeing the color consistently in the HTML picker, MeshBasicMaterial color, Fog color, and so on.

Related:

  • https://discord.com/channels/685241246557667386/1059601330211131402/1059601330211131402

1 By default in Safari and Firefox, and with no other options in Chrome. The option to reach Linear-sRGB ("Rec. ITU-R BT.709-5") in Safari and Firefox is pretty hard to find, and I doubt we can expect users to do so. That option does not affect the value returned to the page, which appears to be sRGB in any case.

Created at 3 days ago

Updated builds.

Created at 3 days ago