🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

glsl-modules

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glsl-modules - npm Package Compare versions

Comparing version
0.6.0
to
0.7.0
+0
-1
dist/core-system/module-content/index.d.ts

@@ -10,2 +10,1 @@ export * from "./base-entity.js";

export * from "./types.js";
export * from "./uniform.js";

@@ -26,2 +26,1 @@ "use strict";

__exportStar(require("./types.js"), exports);
__exportStar(require("./uniform.js"), exports);
+1
-2
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const func_js_1 = require("../core-system/module-content/func.js");
const match_iterator_js_1 = require("../utils/match-iterator.js");

@@ -42,3 +41,3 @@ // Work in progress!

for (const entity of moduleEntities) {
if (!(entity instanceof func_js_1.Func))
if (entity.type !== "function")
continue;

@@ -45,0 +44,0 @@ entity.definition;

@@ -57,3 +57,3 @@ "use strict";

function isHigherOrderFunction(entity) {
return entity instanceof func_js_1.Func &&
return entity.type === "function" &&
entity.arguments.some((arg) => arg.type === functionalTypePlaceholder);

@@ -80,3 +80,3 @@ }

const candidateEntity = candidateEntities.pop();
if (!(candidateEntity instanceof func_js_1.Func))
if (candidateEntity.type !== "function")
continue;

@@ -83,0 +83,0 @@ const candidateFunctionalArguments = getFunctionalArguments(candidateEntity);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.namedArgumentsPlugin = namedArgumentsPlugin;
const index_js_1 = require("../core-system/module-content/index.js");
const index_js_2 = require("../utils/index.js");
const index_js_1 = require("../utils/index.js");
const pluginId = "named-arguments";

@@ -15,3 +14,3 @@ // Finds instances of functionName({ parameterString })

preprocess(code) {
for (const match of (0, index_js_2.matchIterator)(code, namedParameterRegex)) {
for (const match of (0, index_js_1.matchIterator)(code, namedParameterRegex)) {
const parameterList = match.groups[1].trim();

@@ -32,3 +31,3 @@ if (!parameterList)

const replacements = [];
for (const match of (0, index_js_2.matchIterator)(entity.definition, namedParameterRegex)) {
for (const match of (0, index_js_1.matchIterator)(entity.definition, namedParameterRegex)) {
const call = match.selection;

@@ -39,3 +38,3 @@ const [entityName, parameterList] = match.groups;

.map((v) => v.entity)
.filter((e) => e instanceof index_js_1.Func || e instanceof index_js_1.Struct);
.filter((e) => e.type === "function" || e.type === "struct");
if (!candidates)

@@ -63,3 +62,3 @@ throw new Error(`No function/struct "${entityName}" found`);

function createParameterValueMap(parameterList, mode) {
const parameterStrings = (0, index_js_2.splitAtCommasOutsideBraces)(parameterList.trim())
const parameterStrings = (0, index_js_1.splitAtCommasOutsideBraces)(parameterList.trim())
.filter((s) => s);

@@ -66,0 +65,0 @@ const parameterNameValueMap = parameterStrings.reduce((map, paramString) => {

{
"name": "glsl-modules",
"version": "0.6.0",
"version": "0.7.0",
"exports": {

@@ -5,0 +5,0 @@ ".": {