Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use strings as properties to allow property mangling. #901

Open
jespertheend opened this issue Mar 14, 2024 · 1 comment
Open

Use strings as properties to allow property mangling. #901

jespertheend opened this issue Mar 14, 2024 · 1 comment
Assignees
Labels
effort: Moderate Will take a good amount of time and experience with the codebase, but feasible.
Milestone

Comments

@jespertheend
Copy link
Collaborator

Right now when minifying scripts, things such as gltf parsing break because the properties have been mangled.
We should use x["foo"] and { "foo": true } syntax to make sure these props don't get mangled.

On top of that we should add a way to write tests that run on minified builds.

@jespertheend jespertheend added the effort: Moderate Will take a good amount of time and experience with the codebase, but feasible. label Mar 14, 2024
@jespertheend jespertheend added this to the V1.0 milestone Mar 14, 2024
@jespertheend
Copy link
Collaborator Author

So far these are all the strings I was able to find that break because of this:

Details // WebGPU renderer structBlock

// TypedMessenger
sendData
args
didThrow

// Mesh.AttributeType
COLOR
BITANGENT
NORMAL
POSITION
TANGENT
UV1
UV2

// glTF
minVersion
scenes
extensions
extras
extensionsUsed
extensionsRequired
accessors
asset
buffers
bufferViews
images
materials
meshes
nodes
samplers
scene
scenes
textures
copyright
generator
version
minVersion
children
skin
matrix
mesh
rotation
scale
translation
weights
pbrMetallicRoughness
normalTexture
occlusionTexture
emissiveTexture
emissiveFactor
alphaMode
alphaCutoff
doubleSided
baseColorFactor
baseColorTexture
metallicFactor
roughnessFactor
metallicRoughnessTexture
sampler
source
magFilter
minFilter
wrapS
wrapT
uri
mimeType
bufferView
index
texCoord
primitives
weights
attributes
indices
material
mode
targets
byteLength
byteStride
target
bufferView
byteOffset
componentType
normalized
count
type
min
max
sparse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: Moderate Will take a good amount of time and experience with the codebase, but feasible.
Projects
None yet
Development

No branches or pull requests

1 participant