CodyJasonBennett Github contribution chart
CodyJasonBennett Github Stats
CodyJasonBennett Most Used Languages

Activity

05 Oct 2022

Issue Comment

CodyJasonBennett

InstancedMesh: use renderable instanceMatrix default

Description

This PR populates InstanceMesh.instanceMatrix with identity matrices so it is renderable by default.

It's a common gotcha I see with new users to render an untransformed InstanceMesh and see nothing onscreen because instanceMatrix is zeroed by default.

Forked On 05 Oct 2022 at 11:50:46

CodyJasonBennett

As an aside, should instanceColor be lazily init with ones or white instead of zeroes? I'm not very familiar with the vertex-colors workflow in three, but that at least seems closer to Material.color.

Commented On 05 Oct 2022 at 11:50:46

CodyJasonBennett

No tree shaking with NextJS and extend syntax

Hi, when using NextJS (12.1.6) the whole Three.module gets bundled on build.

I am including it via below code into a page. If I remove the includes, Three disappears from the bundle. If I include a single module from Three directly, it gets tree-shaken correctly and only that module is included in the build.

import { Canvas, extend } from '@react-three/fiber';

import Mesh from 'three/src/objects/Mesh';
import BoxGeometry from 'three/src/geometries/BoxGeometry';
import MeshStandardMaterial from 'three/src/materials/MeshStandardMaterial';

extend({ Mesh, BoxGeometry, MeshStandardMaterial }); 

Screenshot from 2022-10-05 12-41-35

I tried Googling / searching here to no avail. The same behaviour can be observed in the official boilerplate (https://github.com/pmndrs/react-three-next). If sb can provide me with pointers on how to fix this I would be happy to create a PR.

kind regards Max

Forked On 05 Oct 2022 at 10:53:33

CodyJasonBennett

See https://docs.pmnd.rs/react-three-fiber/api/canvas#tree-shaking, Canvas extends the full three namespace internally but you can can create your own canvas and hardcode extensions or use a transformer like https://github.com/pmndrs/react-three-babel to codemod Canvas.

Commented On 05 Oct 2022 at 10:53:33

CodyJasonBennett

InstancedMesh: lint

Pushed On 05 Oct 2022 at 10:39:05

CodyJasonBennett

InstancedMesh: use renderable instanceMatrix default

Created On 05 Oct 2022 at 10:36:55
Create Branch
CodyJasonBennett In CodyJasonBennett/three.js Create Branchinstancedmesh-identity-matrix

CodyJasonBennett

JavaScript 3D Library.

On 05 Oct 2022 at 10:20:46

CodyJasonBennett

MMDLoader: Add dispose() to helper classes. (#24670)

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Fix HTMLMesh canvases cache usage (#24650)

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Updated builds.

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Nodes: Tangent and Bitangent (#24672)

  • Added TangentNode

  • Added BitangentNode

  • NormalNode: cleanup

  • Added optional value for .getConst()

  • Added .hasGeometryAttribute()

  • AttributeNode: use dummy value if not the geometry does not have the attribute

  • Added tangent, bitangent and TBN properties

  • Added tangent support

  • update example to use tangent

  • fix typo

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

More efficient calculation (#24675)

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Update ShapePath.html

Remove outdated noHoles parameter from toShapes().

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Nodes: Added frameId (#24680)

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

OutlinePass: Fix shader compilation error. (#24681)

  • Fix outline pass for materials which do not use world position

  • Retaining whitespace from worldpos_vertex shader include

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

New animation / skinning / ik example (#24652)

  • kira example

  • kira example

  • adding link to the example into CCDIKSolver documentation

  • removing old file

  • updating final url

  • lil-gui 0.16 + Tween

  • fix eslint issues

  • glb

  • no dead comments

  • remaining dead comments

  • adding to the screenshot's exceptionList

  • chore: textures from glb

  • feat: no fancy

  • re-enabling screenshot

  • tabs

  • followSphere off by default

  • Update webgl_animation_skinning_ik.html

Clean up.

  • fix(CCDIKSolver warning): links order count + removing 1 useless link

  • chore: better camera angle

  • fix: eslint --fix

  • transformControls showX false

  • new glb version

  • updating screenshot

  • fixing link to the experiment

  • Update CCDIKSolver.js

  • Update webgl_animation_skinning_ik.html

Co-authored-by: Michael Herzog michael.herzog@human-interactive.org

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Update webgl_animation_skinning_ik.html

Update title.

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Examples: Clean up. (#24686)

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

example ik: license (#24688)

  • chore: glb with applied armature modifiers + minimum bones

  • CC0

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Docs italian version (#24687)

  • feat: add Audio italian version

  • feat: add Cameras italian version

  • fix: remove error letter

  • feat: add Constants italian version

  • feat: add Core italian version

  • feat: add Extras italian version

  • Update docs/api/it/extras/curves/ArcCurve.html

Co-authored-by: DaveDev dbruner@surveymonkey.com

  • Update docs/api/it/extras/core/Shape.html

Co-authored-by: DaveDev dbruner@surveymonkey.com

  • Update docs/api/it/extras/curves/CatmullRomCurve3.html

Co-authored-by: DaveDev dbruner@surveymonkey.com

  • Update docs/api/it/extras/core/ShapePath.html

Co-authored-by: DaveDev dbruner@surveymonkey.com

  • feat: add Geometries italian version

  • feat: add helpers italian version

  • feat: add lights italian version

  • feat: add Lights italian version

  • Add Lights italian version

  • Fix it section indentation

  • Update list.json

  • Add Loaders italian version

  • Add Loaders italian version

  • feat: add Material italian version

  • change dispose in Material to follow the english version

Co-authored-by: DaveDev dbruner@surveymonkey.com Co-authored-by: Michael Herzog michael.herzog@human-interactive.org

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Rename Disclaimer.md to DISCLAIMER.md

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

ShaderNode: luminance(), lumaCoeffs (#24682)

  • ShaderNode: luminance, lumaCoeffs

  • cleanup

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

WebGLTextures: Fix multisampled rendering for non-Quest VR browsers. (#24689)

  • WebXR: don't force renderbuffer to sRGB format

  • rename isVideoTexture to forcePassthroughEncoding in getInternalFormat

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Updated builds.

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Revert "WebGLTextures: Fix multisampled rendering for non-Quest VR browsers. (#24689)" (#24696)

This reverts commit cf88d022d503b16f6a8de8afe125b732091e8c3f.

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Updated builds.

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Controls: Move remaining classes to Pointer Events. (#24693)

  • Controls: Remove remaining classes to Pointer Events.

  • Update FirstPersonControls.js

Pushed On 05 Oct 2022 at 10:05:21

CodyJasonBennett

Wasm build

Following the discussion on #113 :

It would be nice to have the option to use the rapier3d Wasm build instead of the rapier3d-compat build.

Size on disk as of 0.9.0: rapier3d (Wasm): 1.4MB rapier3d-compat (JS): 1.9MB

Forked On 05 Oct 2022 at 02:12:57

CodyJasonBennett

Haven't people inlined WASM payloads into JS? Maybe via LZ4.

Commented On 05 Oct 2022 at 02:12:57

CodyJasonBennett

chore: name component with example

Pushed On 05 Oct 2022 at 01:39:11

CodyJasonBennett

fix: prefer imperative loop for profilers, cleanup TS cast

Pushed On 05 Oct 2022 at 01:36:05

CodyJasonBennett

fix(core):cannot remove effects correctly when use addEffect/addAfterEffect/addTail (#2357)

Co-authored-by: wangzongqi01 wangzongqi01@baidu.com

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

Expose position information on state.size (#2339)

  • --wip-- expose entire RectReadOnly form useMeasure on state.size

  • add top and left to state.size, adjusting typings

  • update test expectations

  • re-arrange arguments to setSize for backwards compat, leaving TODO comment

  • chore: lint

Co-authored-by: Cody Bennett 23324155+CodyJasonBennett@users.noreply.github.com

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

docs(changeset): Expose position information in state.size

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

RELEASING: Releasing 2 package(s)

Releases: @react-three/fiber@8.1.0 @react-three/test-renderer@9.0.0

[skip ci]

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

add demos

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

refactor: renderer update (#2360)

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

feat: expose ThreeElements interface (#2347)

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

docs(changeset): feat: expose ThreeElements interface for JSX elements

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

RELEASING: Releasing 1 package(s)

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

new demo

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

Merge branch 'master' of https://github.com/pmndrs/react-three-fiber

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

chore: better text hints

Follows-up https://github.com/pmndrs/react-three-fiber/issues/2382

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

fix: use useLayoutEffect in native (#2376)

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

docs(changeset): fix: prefer useLayoutEffect in react-native

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

RELEASING: Releasing 1 package(s)

Releases: @react-three/fiber@8.2.1

[skip ci]

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

fix typo in example.mdx (#2384)

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

Fix typo in useLoader example (#2385)

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

chore(tests): tests typecheck (#2375)

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

fix(renderer): warn on text instance, null check on instance create (#2395)

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

docs(changeset): fix: warn on stray text

Pushed On 05 Oct 2022 at 01:32:54

CodyJasonBennett

feat(Instances): expose types, ref (#1080)

Pushed On 05 Oct 2022 at 01:24:17

CodyJasonBennett

feat(Instances): expose types, ref

Created On 05 Oct 2022 at 01:24:17

CodyJasonBennett

feat: add makeDefault prop to examples' controls (#1081)

Pushed On 05 Oct 2022 at 01:23:39

CodyJasonBennett

feat: add makeDefault prop to examples' controls

Created On 05 Oct 2022 at 01:23:39
Issue Comment

CodyJasonBennett

Consider a different CDN for drei-assets

I have been playing around with in drei and this morning I noticed my app failing to work, showing CORS errors in the console:

Access to XMLHttpRequest at 'https://rawcdn.githack.com/pmndrs/drei-assets/aa3600359ba664d546d05821bcbca42013587df2/hdri/dikhololo_night_1k.hdr' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

three.module.js:34824 GET https://rawcdn.githack.com/pmndrs/drei-assets/aa3600359ba664d546d05821bcbca42013587df2/hdri/dikhololo_night_1k.hdr net::ERR_FAILED 

Going to that URL directly gave me at first a 429 error:

429: Too Many Requests 

Trying a minute later gave me a 522 cloudflare error

Error 522 Ray ID: 64dc52f2b941ed17 • 2021-05-11 15:08:56 UTC
Connection timed out 

Might be worth using a different CDN that is more reliable, it was super cool how easy it was to use. But also easy enough for me to just host the hdr files locally (thank you open source!). For future reference,

-<Environment preset="city" />
+<Environment path="/hdri/" files="potsdamer_platz_1k.hdr" /> 

The above code assumes the hdr file was put at url path /hdri/potsdamer_platz_1k.hdr

Forked On 05 Oct 2022 at 01:20:34

CodyJasonBennett

We moved lots of assets to https://market.pmnd.rs. Please do let me know if there are any withstanding issues, although I can only recommend vendoring and self-hosting assets in production for privacy reasons.

Commented On 05 Oct 2022 at 01:20:34
Issue Comment

CodyJasonBennett

Cloud not loading or showing errors

  • three version:
  • @react-three/fiber version:
  • ^7.0.7
  • @react-three/drei version: ^7.11.0
  • node version:
  • v17.2.0
  • npm (or yarn) version:
  • 8.1.4

Problem description:

I am looking to integrate the Cloud into my scene but nothing is rendering. I'm thinking it could be from this breaking change?. Please help :)

Forked On 05 Oct 2022 at 01:19:23

CodyJasonBennett

We had migrated hosts for assets so this component should work as expected now.

Commented On 05 Oct 2022 at 01:19:23

CodyJasonBennett

chore: lint

Pushed On 05 Oct 2022 at 01:17:09

CodyJasonBennett

feat: add makeDefault prop to examples' controls

Created On 05 Oct 2022 at 01:14:54
Create Branch
CodyJasonBennett In pmndrs/drei Create Branchfeat/controls-makedefault

CodyJasonBennett

🥉 useful helpers for react-three-fiber

On 05 Oct 2022 at 01:14:38

CodyJasonBennett

fix(RoundedBox): widen ref type

Created On 05 Oct 2022 at 01:07:39