Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
a1e05387
Commit
a1e05387
authored
4 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
add Mesh.getOriginalData accessor
parent
d9630362
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/mol-geo/geometry/mesh/mesh.ts
+7
-1
7 additions, 1 deletion
src/mol-geo/geometry/mesh/mesh.ts
src/mol-gl/renderable/mesh.ts
+1
-1
1 addition, 1 deletion
src/mol-gl/renderable/mesh.ts
src/mol-gl/renderable/schema.ts
+1
-0
1 addition, 0 deletions
src/mol-gl/renderable/schema.ts
with
9 additions
and
2 deletions
src/mol-geo/geometry/mesh/mesh.ts
+
7
−
1
View file @
a1e05387
...
@@ -177,12 +177,18 @@ export namespace Mesh {
...
@@ -177,12 +177,18 @@ export namespace Mesh {
ValueCell
.
update
(
mesh
.
vertexBuffer
,
v
);
ValueCell
.
update
(
mesh
.
vertexBuffer
,
v
);
}
}
type
OriginalData
=
{
export
type
OriginalData
=
{
indexBuffer
:
Uint32Array
indexBuffer
:
Uint32Array
vertexCount
:
number
vertexCount
:
number
triangleCount
:
number
triangleCount
:
number
}
}
/** Meshes may contain some original data in case any processing was done. */
export
function
getOriginalData
(
x
:
Mesh
|
MeshValues
)
{
const
{
originalData
}
=
'
kind
'
in
x
?
x
.
meta
:
x
.
meta
.
ref
.
value
as
Mesh
[
'
meta
'
];
return
originalData
as
OriginalData
|
undefined
;
}
/**
/**
* Ensure that each vertices of each triangle have the same group id.
* Ensure that each vertices of each triangle have the same group id.
* Note that normals are copied over and can't be re-created from the new mesh.
* Note that normals are copied over and can't be re-created from the new mesh.
...
...
This diff is collapsed.
Click to expand it.
src/mol-gl/renderable/mesh.ts
+
1
−
1
View file @
a1e05387
...
@@ -22,7 +22,7 @@ export const MeshSchema = {
...
@@ -22,7 +22,7 @@ export const MeshSchema = {
dFlipSided
:
DefineSpec
(
'
boolean
'
),
dFlipSided
:
DefineSpec
(
'
boolean
'
),
dIgnoreLight
:
DefineSpec
(
'
boolean
'
),
dIgnoreLight
:
DefineSpec
(
'
boolean
'
),
dXrayShaded
:
DefineSpec
(
'
boolean
'
),
dXrayShaded
:
DefineSpec
(
'
boolean
'
),
meta
:
ValueSpec
(
'
any
'
)
meta
:
ValueSpec
(
'
unknown
'
)
}
as const
;
}
as const
;
export
type
MeshSchema
=
typeof
MeshSchema
export
type
MeshSchema
=
typeof
MeshSchema
export
type
MeshValues
=
Values
<
MeshSchema
>
export
type
MeshValues
=
Values
<
MeshSchema
>
...
...
This diff is collapsed.
Click to expand it.
src/mol-gl/renderable/schema.ts
+
1
−
0
View file @
a1e05387
...
@@ -17,6 +17,7 @@ export type ValueKindType = {
...
@@ -17,6 +17,7 @@ export type ValueKindType = {
'
string
'
:
string
'
string
'
:
string
'
boolean
'
:
boolean
'
boolean
'
:
boolean
'
any
'
:
any
'
any
'
:
any
'
unknown
'
:
unknown
'
m4
'
:
Mat4
,
'
m4
'
:
Mat4
,
'
float32
'
:
Float32Array
'
float32
'
:
Float32Array
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment